package com.csw.fish;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2022/11/15 0:38
 */
public class GameUtils {
    //分数
    static int score =0;
    //方向
    static boolean UP =false;
    static boolean DOWN =false;
    static boolean LEFT =false;
    static boolean RIGHT =false;
    //关卡难度
    static int level =0;
    //定义静态背景图片
    public static Image bgImg=Toolkit.getDefaultToolkit().createImage("images/sea.jpg");
    //敌方鱼类
    public static Image enamy1_img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_r.gif");
    public static Image enamyr_img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_l.gif");
    public static Image enamyl_2img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish2_r.png");
    public static Image enamyr_2img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish2_l.png");
    public static Image enamyl_3img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish3_r.gif");
    public static Image enamyr_3img=Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish3_l.gif");
    public static Image enamy_bossimg=Toolkit.getDefaultToolkit().createImage("images/enemyFish/boss.gif");
    //敌方鱼集合
    public static List<Enamy> EnamyList = new ArrayList<Enamy>();

    //我方鱼
    public static Image MyFishimg_L =Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_left.gif");
    public static Image MyFishimg_R =Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_right.gif");

    //绘制文字的工具类
    public static void drawWord(Graphics g,String str,Color color,int size,int x,int y){
        g.setColor(color);
        g.setFont(new Font("仿宋", Font.BOLD, size));
        g.drawString(str, x, y);
    }
}
